{literal}
<script type='text/javascript' language='javascript'>

{/literal}
	{$script}
{literal}

$("#lnkGerarCSV").click(function(){
	var params = $("#form_result").serialize();
	window.location.href = "relatorio/gerar-csv-contrato/?" + params;
});

</script>
{/literal}
{$mensagem}
{$corpo_html_extrato}

<table width="100%" style="border:1px #AFAFAF solid" cellpadding="1" cellspacing="0">
  <tr>
  	<td colspan="2">
		<table width="100%" cellpadding="3" cellspacing="0">
			<tr>
				<td width="20%" bgcolor="#EBEFF0">
					<img src='{$_site.url}public/images/logo_extrato.gif' border='0' title='Alterar' width='150px'><br>
				</td>
				<td width="60%" align="center" class="bold terra zeta" bgcolor="#EBEFF0">
					RELA&Ccedil;&Atilde;O DE ARQUIVOS DE LOG DE COBRAN&Ccedil;A
				</td>
				<td width="20%" align="right" bgcolor="#EBEFF0" class=" terra bold">
					Data: {$smarty.now|date_format:"%d/%m/%Y"}
				</td>
			</tr>
		</table>
	</td>
  </tr>
  <tr>
    <td width="100%" valign="top">
    <!--
		<fieldset>
		<legend><b>AGENDAMENTOS</b></legend>
		-->
		<div class="terra bold paddingBottom10">Arquivos encontrados</div>
		<div align="right" class="brod">Num. registros (<b>{$num_arquivos}</b>)</div>
		<form action="" name="form_result" id="form_result">
		<table width="100%" border="0" cellspacing="0" cellpadding="5" class="brod" style="border:1px #AFAFAF solid">
		<tr>
			<td width="30%" class=" bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">Mes/Ano</td>
			<td width="30%" class=" bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">Arquivo</td>
			<td width="30%" class=" bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">&Uacute;ltima modifica&ccedil;&atilde;o</td>
		</tr>
        {assign var='bg1' value='#EBEFF0'}    
		{assign var='bg2' value=''}
		{assign var='i' value=1}
	    {foreach from=$arquivos item=arquivo key=k}
	    
	    {if $i++ is odd by 1} 
		   {assign var='bgcolor' value=$bg1} 
		{else} 
		   {assign var='bgcolor' value=$bg2} 
		{/if}
		<tr bgcolor="{$bgcolor}">
			<td style="border-left:0px #AFAFAF solid; border-right:1px #AFAFAF solid">{$arquivo.mes_arquivo}/{$arquivo.ano_arquivo}</td>
			<td style="border-right:1px #AFAFAF solid">
				<a href="{$_site.url}{$cteUrlArquivosLogCobranca}{$arquivo.arquivo}" target="_blank">{$arquivo.arquivo} ({$arquivo.tamanho_arquivo})</a>
			</td>
			<td style="border-right:1px #AFAFAF solid">
				<a href="{$_site.url}{$cteUrlArquivosLogCobranca}{$arquivo.arquivo}" target="_blank">{$arquivo.ultima_modificacao}</a>
			</td>
		</tr>
		{foreachelse}
		<tr>
			<td colspan="5">Nenhum registro encontrado</td>
		</tr>
		{/foreach}
		</table>
		</form>
	 </td>
  </tr>
</table>